chore(Wizard): updated API for WizardBody and docs for footer#10637
chore(Wizard): updated API for WizardBody and docs for footer#10637tlabaj merged 5 commits intopatternfly:v6from
Conversation
| onSave, | ||
| onClose, | ||
| shouldFocusContent = false, | ||
| shouldFocusContent = true, |
There was a problem hiding this comment.
@tlabaj I believe we had said that for v6 we wanted to make this the default, rather than an opt in, correct? If that's still the case then we could remove the example that shows this functionality, as well as update failing integration tests.
There was a problem hiding this comment.
Yes, that is what was discussed for accessibility purposes
|
Preview: https://patternfly-react-pr-10637.surge.sh A11y report: https://patternfly-react-pr-10637-a11y.surge.sh |
| /** Props for WizardBody that wraps content by default. Can be set to null for exclusion of WizardBody. */ | ||
| body?: Omit<Omit<WizardBodyProps, 'children'>, 'children'> | null; | ||
| /** Props for WizardBody that wraps content by default. */ | ||
| body?: Omit<Omit<WizardBodyProps, 'children'>, 'children'>; |
There was a problem hiding this comment.
Should the prop also be marked as required so that undefined can't be passed / the prop omitted? It sounds that way based on the issue, but I could be misunderstanding.
There was a problem hiding this comment.
I think it being optional should be fine. I'll try locally, but the logic in WizardToggle checks whether body || body === undefined to render the WizardBody wrapping children. We could probably just remove that conditional now,, though, since we should always want the WizardBody wrapper.
There was a problem hiding this comment.
Just to clarify, the body prop in WizardStep is for passing an object of WizardBody props in; the prop name isn't exactly descriptive of the actual behavior. May be worth updating the prop to bodyProps instead at some point.
7a2108c to
e078f56
Compare
e078f56 to
2b63af4
Compare
What: Closes #10399 and #10319
Pairs with https://github.com/patternfly/patternfly/pull/6807/files
First commit is for the WizardBody update, second commit is for the footer example updates
Codemod: patternfly/pf-codemods#667
Additional issues: